package com.hezy.base.ui;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

import com.hezy.base.R;

public abstract class BaseFragmentActivity extends BaseActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.base_fragment_activity);
        FragmentManager manager = getSupportFragmentManager();
        manager.beginTransaction().add(R.id.frame_content, createFragment()).commit();
    }

    protected abstract Fragment createFragment();
}
